<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="XmlRpc.multicall.html">
<link rel="Up" href="XmlRpc.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="XmlRpc" rel="Chapter" href="XmlRpc.html">
<link title="XmlRpcServer" rel="Chapter" href="XmlRpcServer.html">
<link title="XmlRpcDateTime" rel="Chapter" href="XmlRpcDateTime.html">
<link title="XmlRpcBase64" rel="Chapter" href="XmlRpcBase64.html"><title>XmlRpc.client</title>
</head>
<body>
<div class="navbar">&nbsp;<a href="XmlRpc.html">Up</a>
&nbsp;<a href="XmlRpc.multicall.html">Next</a>
</div>
<center><h1>Class <a href="type_XmlRpc.client.html">XmlRpc.client</a></h1></center>
<br>
<pre><span class="keyword">class</span> <a name="TYPEclient"></a>client : <code class="type">?debug:bool -> ?headers:(string * string) list -> ?insecure_ssl:bool -> ?timeout:float -> ?useragent:string -> string -> </code><code class="code">object</code> <a href="XmlRpc.client.html">..</a> <code class="code">end</code></pre>Class for XmlRpc clients. Takes a single mandatory argument, <code class="code">url</code>.
<p>

    If <code class="code">url</code> is of the form "http://username:password@...", basic
    authentication will be used.
<p>

    If <code class="code">url</code> starts with "https", Curl will be used instead of Ocamlnet.
    The "curl" command-line program must be in your path for this to work.
    You can use the <code class="code">insecure_ssl</code> setting to allow connections to servers
    with self-signed certificates; by default this is false and certificates
    must be valid.
<p>

    <code class="code">timeout</code> can be used to specify the maximum amount of time
    elapsed before a connection is cancelled. It defaults to 300.0 seconds.
<p>

    <code class="code">headers</code> may contain an array of (name, value) pairs of additional
    headers to send with each request.
<p>

    The <code class="code">useragent</code> setting provides a convenient way to change the
    User-Agent header, which defaults to "XmlRpc-Light/&lt;version&gt;".
<p>

    The <code class="code">debug</code> setting, if true, will enable verbose debugging output to
    the standard error stream.<br>
<hr width="100%">
<pre><span class="keyword">val</span> <a name="ATTurl"></a>url : <code class="type">string</code></pre><div class="info">
Url of the remote XmlRpc server.<br>
</div>
<pre><span class="keyword">val</span> <a name="ATTdebug"></a><span class="keyword">mutable</span> debug : <code class="type">bool</code></pre><div class="info">
If true, Xml messages will be printed to standard error.<br>
</div>
<pre><span class="keyword">val</span> <a name="ATTheaders"></a><span class="keyword">mutable</span> headers : <code class="type">(string * string) list</code></pre><div class="info">
List of custom HTTP headers to send with each request.<br>
</div>
<pre><span class="keyword">val</span> <a name="ATTinsecure_ssl"></a><span class="keyword">mutable</span> insecure_ssl : <code class="type">bool</code></pre><div class="info">
If true, SSL will be allowed even if the certificate is self-signed.<br>
</div>
<pre><span class="keyword">val</span> <a name="ATTtimeout"></a><span class="keyword">mutable</span> timeout : <code class="type">float</code></pre><div class="info">
Maximum time to wait for a request to complete, in seconds.<br>
</div>
<pre><span class="keyword">val</span> <a name="ATTuseragent"></a><span class="keyword">mutable</span> useragent : <code class="type">string</code></pre><div class="info">
User-agent to send in request headers.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODurl"></a>url : <code class="type">string</code></pre><div class="info">
Gets <code class="code">url</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODdebug"></a>debug : <code class="type">bool</code></pre><div class="info">
Gets <code class="code">debug</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_debug"></a>set_debug : <code class="type">bool -> unit</code></pre><div class="info">
Sets <code class="code">debug</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODheaders"></a>headers : <code class="type">(string * string) list</code></pre><div class="info">
Gets <code class="code">headers</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_headers"></a>set_headers : <code class="type">(string * string) list -> unit</code></pre><div class="info">
Sets <code class="code">headers</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODinsecure_ssl"></a>insecure_ssl : <code class="type">bool</code></pre><div class="info">
Gets <code class="code">insecure_ssl</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_insecure_ssl"></a>set_insecure_ssl : <code class="type">bool -> unit</code></pre><div class="info">
Sets <code class="code">insecure_ssl</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODtimeout"></a>timeout : <code class="type">float</code></pre><div class="info">
Gets <code class="code">timeout</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_timeout"></a>set_timeout : <code class="type">float -> unit</code></pre><div class="info">
Sets <code class="code">timeout</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODuseragent"></a>useragent : <code class="type">string</code></pre><div class="info">
Gets <code class="code">useragent</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_useragent"></a>set_useragent : <code class="type">string -> unit</code></pre><div class="info">
Sets <code class="code">useragent</code>.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_base64_encoder"></a>set_base64_encoder : <code class="type">(string -> string) -> unit</code></pre><div class="info">
Sets an alternate Base-64 binary encoding function.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_base64_decoder"></a>set_base64_decoder : <code class="type">(string -> string) -> unit</code></pre><div class="info">
Sets an alternate Base-64 binary decoding function.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_datetime_encoder"></a>set_datetime_encoder : <code class="type">(<a href="XmlRpcDateTime.html#TYPEt">XmlRpcDateTime.t</a> -> string) -> unit</code></pre><div class="info">
Sets an alternate ISO-8601 date/time encoding function.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODset_datetime_decoder"></a>set_datetime_decoder : <code class="type">(string -> <a href="XmlRpcDateTime.html#TYPEt">XmlRpcDateTime.t</a>) -> unit</code></pre><div class="info">
Sets an alternate ISO-8601 date/time decoding function.<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODcall"></a>call : <code class="type">string -> <a href="XmlRpc.html#TYPEvalue">value</a> list -> <a href="XmlRpc.html#TYPEvalue">value</a></code></pre><div class="info">
<code class="code">call name params</code> invokes an XmlRpc method and returns the result,
      or raises <a href="XmlRpc.html#EXCEPTIONError"><code class="code">XmlRpc.Error</code></a> on error.<br>
</div>
</body></html>